import apiClient from '../apiClient';

/*
 * @Author: xiaosihan
 * @Date: 2023-09-21 01:57:44
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-10-05 09:35:11
 */
class UserImageService {
  //通过图片id删除图片
  async del_user_image_by_id(domainId: number): Promise<any> {
    return apiClient.delete({ url: '/admin/member-image/delete', params: { domainId } });
  }
  //获取图片列表
  async get_user_image_list({
    pageNo,
    pageSize,
  }: {
    pageNo: number;
    pageSize: number;
  }): Promise<any> {
    return apiClient.get({ url: '/admin/member-image/page', params: { pageNo, pageSize } });
  }

  //保存上传的图片
  saveImage(picPath: string) {
    return apiClient.post({ url: '/admin/member-image/add', data: { picPath } });
  }
}

const userImageService = new UserImageService();

export default userImageService;
